import pytest

from Pages.page_search import PageSearch
from config import PATH
from script import log



class TestSearch:
    @pytest.mark.flaky(reruns=2, reruns_delay=1)
    def test_search(self, get_driver, login):
        self.search = PageSearch(get_driver)
        self.search.search_input_goods("手机")
        aa = self.search.search_assert()
        log.info(aa)
        self.search.base_get_img(PATH + "/img/search_phone.png")
        assert "手机" in aa
